
/**
 * libemulation
 * Device interface
 * (C) 2011 by Marc S. Ressl (mressl@umich.edu)
 * Released under the GPL
 *
 * Defines the device interface
 */

#ifndef _DEVICEINTERFACE_H
#define _DEVICEINTERFACE_H

#include <string>
#include <vector>

using namespace std;

typedef enum
{
    DEVICE_SET_LABEL,
    DEVICE_GET_LABEL,
    DEVICE_SET_IMAGEPATH,
    DEVICE_GET_IMAGEPATH,
    DEVICE_SET_LOCATIONLABEL,
    DEVICE_GET_LOCATIONLABEL,
    DEVICE_SET_STATELABEL,
    DEVICE_GET_STATELABEL,
    
    DEVICE_SET_SETTINGS,
    DEVICE_GET_SETTINGS,
    
    DEVICE_CONSTRUCT_CANVAS,
    DEVICE_DESTROY_CANVAS,
    DEVICE_GET_CANVASES,
    
    DEVICE_ADD_STORAGE,
    DEVICE_REMOVE_STORAGE,
    DEVICE_GET_STORAGES,
    
    DEVICE_UPDATE,
    DEVICE_IS_EVENT_OBSERVERS,
    DEVICE_ASSERT_ACTIVITY,
    DEVICE_CLEAR_ACTIVITY,
} DeviceMessage;

typedef struct
{
    string ref;
    string name;
    string label;
    string type;
    string options;
} DeviceSetting;

typedef vector<DeviceSetting> DeviceSettings;

typedef enum
{
    DEVICE_EVENT_DID_OCCUR,
} DeviceNotification;

typedef enum
{
    DEVICE_POWERDOWN = 0x81,
    DEVICE_SLEEP,
    DEVICE_WAKEUP,
    DEVICE_CONTEXT,
    DEVICE_MAINMENU,
    DEVICE_APPMENU,
    DEVICE_MENUHELP,
    DEVICE_MENUEXIT,
    DEVICE_MENUSELECT,
    DEVICE_MENURIGHT,
    DEVICE_MENULEFT,
    DEVICE_MENUUP,
    DEVICE_MENUDOWN,
    DEVICE_COLDRESTART,
    DEVICE_WARMRESTART,
    DEVICE_DPADUP,
    DEVICE_DPADDOWN,
    DEVICE_DPADRIGHT,
    DEVICE_DPADLEFT,
    
    DEVICE_DOCK = 0xa0,
    DEVICE_UNDOCK,
    DEVICE_SETUP,
    DEVICE_BREAK,
    DEVICE_DEBUGGERBREAK,
    DEVICE_APPLICATIONBREAK,
    DEVICE_APPLICATIONDEBUGGERBREAK,
    DEVICE_SPEAKERMUTE,
    DEVICE_HIBERNATE,
    
    DEVICE_DISPLAYINVERT = 0xb0,
    DEVICE_DISPLAYINTERNAL,
    DEVICE_DISPLAYEXTERNAL,
    DEVICE_DISPLAYBOTH,
    DEVICE_DISPLAYDUAL,
    DEVICE_DISPLAYTOGGLEINTEXT,
    DEVICE_DISPLAYSWAPPRIMARYSECONDARY,
    DEVICE_DISPLAYLCDAUTOSCALE,
    
    DEVICE_END,
} DeviceEvent;

#endif
